/* $Id: AppMetaDataDelegate.java 
 * Copyright (C) 2011, TRAKHEES
 *  
 * Revision History
 *
 * Date  			Author 		    	Remarks
 * ---------------------------------------------------------------------------------
 *
 */
package ae.pcfc.etks.online.common.delegate;

import java.util.List;

import ae.pcfc.etks.online.common.ConstantsCommon.WFProcessType;
import ae.pcfc.etks.online.common.vo.AdminApprovalVO;
import ae.pcfc.etks.online.common.vo.AppMetaDataDetailVO;
import ae.pcfc.etks.online.common.vo.AppMetaDataVO;
import ae.pcfc.etks.online.common.vo.LabelVO;
import ae.pcfc.etks.online.common.vo.WorkflowRequestSearchCriteriaVO;
import ae.pcfc.etks.online.common.vo.WorkflowRequestVO;

public interface AppMetaDataDelegate extends BaseDelegate {
	
	/**
	 * loadAppMetaData
	 * Method to load the information required by the admin for acting on the application
	 * @param applicationId
	 * @return
	 * AdminApprovalVO
	 */
	public AdminApprovalVO loadAppMetaData(String applicationId);
	
	/**
	 * loadAppMetaDataByUserId
	 * Method to load the list of application requests by user id 
	 * @param id
	 * @return
	 * List<AppMetaDataDetailVO>
	 */
	public List<AppMetaDataDetailVO> loadAppMetaDataByUserId(Long id);
	
	/**
	 * loadAppMetaDataByClientRefNo
	 * Method to load the list of application requests by reference number
	 * @param refNo
	 * @return
	 * AppMetaDataDetailVO
	 */
	public AppMetaDataDetailVO loadAppMetaDataByClientRefNo(String refNo);
	
	/**
	 * loadCompletedAppMetaDataByUserId
	 * Method to load the list of completed application requests for an user id
	 * @param id
	 * @return
	 * List<AppMetaDataDetailVO>
	 */
	public List<AppMetaDataDetailVO> loadCompletedAppMetaDataByUserId(Long id);
	
	/**
	 * searchAppMetaDataVOByExample
	 * Method to search application requests by AppMetaDataVO which contains the fields for filtering the results
	 * @param appMetaDataVO
	 * @return
	 * List<AppMetaDataVO>
	 */
	public List<AppMetaDataVO> searchAppMetaDataVOByExample(AppMetaDataVO appMetaDataVO);
	
	/**
	 * searchAppMetaDataDetailVOByExample
	 * Method to search application requests by AppMetaDataDetailVO which contains the fields for filtering the results 
	 * @param appMetaDataDetailVO
	 * @return
	 * List<AppMetaDataDetailVO>
	 */
	public List<AppMetaDataDetailVO> searchAppMetaDataDetailVOByExample(AppMetaDataDetailVO appMetaDataDetailVO);
	
	
	
	/**
	 * createApplicationRequest
	 * Method to create application request
	 * @param appMetaDataVO
	 * void
	 */
	public void createApplicationRequest(AppMetaDataVO appMetaDataVO);
	
	/**
	 * updateApplicationRequest
	 * Method to update application request
	 * @param appMetaDataVO
	 * void
	 */
	public void updateApplicationRequest(AppMetaDataVO appMetaDataVO);
	
	//public void updateApplicationStatus(String applicationId, String statusEn, String statusAr);
	
	/**
	 * loadApplicationRequest
	 * Method to load application request by application id
	 * @param applicationId
	 * @return
	 * AppMetaDataVO
	 */
	public AppMetaDataVO loadApplicationRequest(String applicationId);
	
	/**
	 * searchApplicationRequestsByProcessCode
	 * Method to search application requests by process type
	 * @param processType
	 * @return
	 * List<AppMetaDataVO>
	 */
	public List<AppMetaDataVO> searchApplicationRequestsByProcessCode(WFProcessType processType);
	
	/**
	 * searchApplicationRequestsByInitiator
	 * Method to search application requests by initiator(username)
	 * @param username
	 * @return
	 * List<AppMetaDataVO>
	 */
	public List<AppMetaDataVO> searchApplicationRequestsByInitiator(String username);
	
	/**
	 * SearchApplicationRequests
	 * Method to search application requests by AppMetaDataVO which contains the fields for filtering the results
	 * @param appMetaDataVO
	 * @return
	 * List<AppMetaDataVO>
	 */
	public List<AppMetaDataVO> SearchApplicationRequests(AppMetaDataVO appMetaDataVO);
	
	//public List<AppMetaDataVO> searchApplicationRequestsByUserId(Long userId);
	
	/**
	 * searchApplicationRequestsByApplicationDate
	 * Method to search application requests by application date
	 * @param date
	 * @return
	 * List<AppMetaDataVO>
	 */
	public List<AppMetaDataVO> searchApplicationRequestsByApplicationDate(String date);

	/**
	 * loadAppMetaDataByUserName
	 * Method to load application request by username 
	 * @param strUserName
	 * @return
	 * List<AppMetaDataDetailVO>
	 */
	public List<AppMetaDataDetailVO> loadAppMetaDataByUserName(String strUserName);

	public List<WorkflowRequestVO> searchWorkflowRequests(WorkflowRequestSearchCriteriaVO searchCriteria);

	//public List<AppMetaDataDetailVO> loadCompletedAppMetaDataByUserId(AppMetaDataDetailVO appMetaDataDetailVO);
	
	public List<LabelVO> searchRequestStatus(String searchString);
}
